//
//  photoViewController.m
//  项目一TimeMovie
//
//  Created by apple on 16/4/7.
//  Copyright © 2016年 huangmingyu. All rights reserved.
//

#import "photoFlowLayout.h"
#import "photoCellectionView.h"
#import "photoViewController.h"

@interface photoViewController ()

@end

@implementation photoViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
    
    [self creatSubViews];
}

- (void)creatSubViews {
    
    photoFlowLayout *layout = [[photoFlowLayout alloc] init];
    photoCellectionView *photoColView = [[photoCellectionView alloc] initWithFrame:CGRectMake(0, 0, self.view.width, self.view.height) collectionViewLayout:layout];
    photoColView.dataArray = self.imageURLArr;
    
    [self.view addSubview:photoColView];
    
    [photoColView scrollToItemAtIndexPath:_selectIndexPath atScrollPosition:UICollectionViewScrollPositionCenteredHorizontally animated:YES];
    
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
